📦 [Consolidated] PR #38~#48 の統合・競合解消およびレビュー指摘対応#55
Conversation
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
src/lib/githubYearInReview.ts内のfetchCommitDatesForTopRepos関数において、直列実行されていたコミット取得APIリクエストをPromise.allを使用して並列化。 Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
🎯 **What:** CI failed because of missing `@testing-library/react` and `jsdom` within dependencies that are used within the hook test suite. Added to `package.json` dynamically instead of exclusively relying on `npm i -D` within sandbox runtime, which resulted in CI workflow cache failures. In addition, `vitest` reported typing errors caused by `any` overriding not being accurately replaced by TypeScript and linting. Resolved `Response` object mapping logic and typing assignments on mock callbacks. 📊 **Coverage:** Covered hooks session authentication guards, mocked API endpoints URL inputs to SWR, validated data payload parsing outputs, and SWR global text error parsing fallbacks for generic `fetcher`. Testing environment switched to `jsdom`. ✨ **Result:** Raised `src/hooks/useDashboardData.ts` line, block and function coverage to 100% and restored CI workflow successfully. Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
🎯 **What:** The testing gap addressed The 'loadCardSettings' function had an edge case for when the global 'window' object was not defined, but it wasn't tested. Added comprehensive test coverage to ensure resilience in SSR environments. 📊 **Coverage:** What scenarios are now tested - When 'window' is not defined (SSR environment). - When 'window' is defined, checking parsing behavior. ✨ **Result:** The improvement in test coverage The 'cardSettings.ts' module's critical 'window' logic is now covered by unit tests, preventing future regressions. Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
…13861009318010078666' into fix/consolidated-prs-complete
…5bb' into fix/consolidated-prs-complete
…91336448988' into fix/consolidated-prs-complete
…rd-year-8975921816818319832' into fix/consolidated-prs-complete
…8' into fix/consolidated-prs-complete
…fetch-2499081300861358084' into fix/consolidated-prs-complete
…mplexity-9578357994793823332' into fix/consolidated-prs-complete
…llback-17427369068075534558' into fix/consolidated-prs-complete
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
概要
このPRは、複数の依存関係が重複したり機能連携がある以下11個のPRを一つのブランチにて統合(マージ)し、さらに各位からいただいたレビューコメント等の指摘事項に対応するためのものです。
統合元のPR(これらは本作業に伴いクローズ済みです):
🧪 Add testing for ShareButtons fallback logic🧪 ユニットテストの追加: cardSettings.tsの安全なJSONパースの検証🧪 Add tests for useDashboardData hooks🧹 Refactor fetchUserSummary to reduce complexity⚡ [Performance] GitHub APIリクエストの並列化によるパフォーマンス改善useDashboardDatahook #43:🧪 Add test for useDashboardData hook🧪 /api/dashboard/year の無効な年に関するテストを追加🧹 [コードの健全性向上] ThemeControllerのテーマロジックをカスタムフックに抽出⚡ Optimize fetchStarredRepos with parallel fetching🧪 [Add tests for loadCardSettings window check in cardSettings.ts]🧪 Add 503 error test for /api/card/[username]対応した修正点 (レビュー指摘への対応)
src/lib/__tests__/cardSettings.test.ts(PR 🧪 [Add tests for loadCardSettings window check in cardSettings.ts] #39, 🧪 ユニットテストの追加: cardSettings.tsの安全なJSONパースの検証 #47 指摘対応)customLayoutに対し、CardLayoutの型指定が欠け暗黙のstringになっていたものを追加。customOptionsに対する余分なキャストを無くし安全性を向上。saveCardSettingsに渡すパラメーターが"left"などの文字列になっていたためテストが落ちるものをCardLayoutオブジェクト定義に修正し、テストを正しく動作するように変更。src/lib/github.ts(PR 🧹 Refactor fetchUserSummary to reduce complexity #45 指摘対応)fetchUserSummaryでのエラーハンドリングresult.reason?.message ?? "Unknown error"を改善。result.reason自体が投げられた(Error以外でリジェクトされた)場合でも正常に表示できるよう修正。src/app/api/dashboard/year/route.test.ts(PR 🧪 /api/dashboard/year の無効な年に関するテストを追加 #42 指摘対応)as anyキャストを可能な限り排除。機能していないcreateMockRequest関数をNextRequestを返すように変更し、セッションモック定義を定数で管理して重複を削除。パッケージの重複削除と整理 (PR 🧪 Add tests for useDashboardData hooks #46, 🧪 ユニットテストの追加: cardSettings.tsの安全なJSONパースの検証 #47 マージ競合解消)
package.jsonでの競合解消時に、重複していたjsdom,vitest,@testing-library/*などの devDependencies をクリーンアップ。確認事項
npm run test(137件のテストパス) とnpm run buildは成功することを確認済みです。